<?php
$DocumentPath="C:/xampp1/htdocs/statpro/system/libraries/1413349136.doc";

$word = new COM("word.application") or die("Unable to instantiate application object");

$wordDocument = new COM("word.document") or die("Unable to instantiate document object");

$word->Visible = 0;

$wordDocument = $word->Documents->Open($DocumentPath);

$HTMLPath = substr_replace($DocumentPath, 'html', -3, 3);

$wordDocument->SaveAs($HTMLPath, 3);

$wordDocument = null;

$word->Quit();

$word = null;

readfile($HTMLPath);

unlink($HTMLPath);
?>